package com.jingbian.cppccbackend.mapper.admin;

import com.jingbian.cppccbackend.entity.ActivityOutcomes;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 活动成果表 Mapper 接口
 * </p>
 *
 * @author yezi
 * @since 2025-02-14
 */
@Mapper
public interface adminActivityOutcomesMapper extends BaseMapper<ActivityOutcomes> {

    List<ActivityOutcomes> getOutcomes(String sortType, String startDate, String endDate, String searchText);

    @Delete("delete from activity_outcomes where oid = #{oid}")
    boolean deleteOutcome(Integer oid);

    @Select("select * from activity_outcomes where oid = #{oid}")
    ActivityOutcomes getOutcomeById(Integer oid);
}
